package com.marsoft.test.controller;

import com.marsoft.test.entity.GuarantyInsuranceInfoEntity;
import com.marsoft.test.service.GuarantyInsuranceInfoService;
import com.marsoft.test.utils.ResultMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author FAN_c
 * @date 2021/5/21 14:27
 * @description
 */
@RestController
public class GuarantyInsuranceInfoController {

    @Autowired
    private GuarantyInsuranceInfoService guarantyInsuranceInfoService;

    @RequestMapping("/findAllGuarantyInsuranceInfo")
    public ResultMap findAllGuarantyInsuranceInfo(){

        List<GuarantyInsuranceInfoEntity> allGuarantyInsuranceInfo =
                guarantyInsuranceInfoService.findAllGuarantyInsuranceInfo();

        return ResultMap.ok().put("date",allGuarantyInsuranceInfo);
    }
}
